<template>
	<view style="padding: 30rpx;">
		<!-- 按钮，打印日志 -->
		<button @click="onLog()">Console.log</button>
		<button @click="onDebug()">Console.Debug</button>
		<button @click="onInfo()">Console.Info</button>
		<button @click="onWarn()">Console.Warn</button>
		<button @click="onError()">Console.Error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				myname: "cys",
				title:"API"
			}
		},
		onload(){
			console.log("onload");
		},
		methods: {
			onLog() {
				// 打印一个日志
				console.log("onlog()-->Name:" + this.myname)
				console.log("clog+enter");
				console.log("onlog()", this.myname,this.title);
				
				// clogv+enter
				console.log('this.myname: ',this.myname);

			},
			onDebug() {
				console.debug("onDebug")
			},
			onInfo() {
				console.info("onInfo")
			},
			onWarn() {
				console.warn("onWarn")
				if (true) {
					console.log("true")
				} else {
					console.warn("快出错了.");
				}
			},
			onError() {
				console.error("onError")
				try {

				} catch (e) {
					console.error(e)
				}
			}

		}
	}
</script>

<style>

</style>